Skip to content

aa#151

Merged
winnerspiros merged 2 commits intowinnerspiros:masterfrom
ppy:master
Apr 4, 2026
Merged

aa#151
winnerspiros merged 2 commits intowinnerspiros:masterfrom
ppy:master

Conversation

@winnerspiros
Copy link
Copy Markdown
Owner

@winnerspiros winnerspiros commented Apr 4, 2026


Summary by Gitar

This will update automatically on new commits.

Summary by CodeRabbit

  • New Features

    • Added visual beatmap availability status display for players during ranked play
    • Added audio feedback for ranked play match outcomes (win, lose, draw)
    • Enhanced audio effects for ranked play results screen, including score animations and rank displays
  • Chores

    • Updated game resources dependency

nekodex and others added 2 commits April 4, 2026 21:50
It's a bit rough and some of the timing isn't perfect, but:


https://github.com/user-attachments/assets/bfee2fa5-b4cd-4665-b70f-d902ad93ae43

Also adds some silly placeholder sounds to the end screen:


https://github.com/user-attachments/assets/31e34067-4343-4464-9777-f93c8cad1021

---
- [x] depends on ppy/osu-resources#415

---------

Co-authored-by: Dean Herbert <pe@ppy.sh>
This has gone through a few iterations, and eventually ended up as a
simple text percentage display next to the username. I feel that adding
another progress bar right next to the big healthbar would make things
too cluttered, and trying to move the beatmap state elsewhere would make
it too disconnected from the players that are potentially downloading a
beatmap.

I considered making the local user fetch download progress data using
`BeatmapDownloadTracker` instead of relying on `BeatmapAvailability` in
order to get more frequent updates, but that would add a lot of extra
complexity for little gain IMO.


[Screencast_20260403_095644.webm](https://github.com/user-attachments/assets/85fbd4b8-6b5c-41d2-b29b-c93885f73bb3)
Copilot AI review requested due to automatic review settings April 4, 2026 15:15
@gitar-bot
Copy link
Copy Markdown

gitar-bot bot commented Apr 4, 2026

Important

You are using the Gitar free plan. Upgrade to unlock code review, CI analysis, auto-apply, custom automations, and more.

Gitar

@winnerspiros winnerspiros merged commit 8a0a731 into winnerspiros:master Apr 4, 2026
2 of 10 checks passed
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 4, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 91cfc7ae-2c72-4777-bba1-fcd107d718f4

📥 Commits

Reviewing files that changed from the base of the PR and between d6f8350 and 8b69aa9.

📒 Files selected for processing (5)
  • osu.Game.Tests/Visual/RankedPlay/TestSceneRankedPlayUserDisplay.cs
  • osu.Game/Screens/OnlinePlay/Matchmaking/RankedPlay/Components/RankedPlayUserDisplay.cs
  • osu.Game/Screens/OnlinePlay/Matchmaking/RankedPlay/EndedScreen.cs
  • osu.Game/Screens/OnlinePlay/Matchmaking/RankedPlay/ResultsScreen.cs
  • osu.Game/osu.Game.csproj

📝 Walkthrough

Walkthrough

This pull request adds audio support and beatmap availability UI to the ranked play matchmaking system. Changes include test updates for validating beatmap state transitions, UI enhancements to display beatmap availability with live multiplayer updates, audio sample playback during ranked match endings and results screens, and a resource dependency version update.

Changes

Cohort / File(s) Summary
Test Infrastructure
osu.Game.Tests/Visual/RankedPlay/TestSceneRankedPlayUserDisplay.cs
Added constructor with health bindable slider setup, enhanced SetUpSteps() to join a ranked-play room, introduced TestBeatmapState() test method to validate beatmap availability state transitions (NotDownloaded → Downloading → Importing → LocallyAvailable).
UI Components
osu.Game/Screens/OnlinePlay/Matchmaking/RankedPlay/Components/RankedPlayUserDisplay.cs
Extended display to show beatmap availability state alongside username; integrated live multiplayer updates via MultiplayerClient.RoomUpdated subscription with conditional text mapping and fading based on beatmap state.
Audio Integration
osu.Game/Screens/OnlinePlay/Matchmaking/RankedPlay/EndedScreen.cs, osu.Game/Screens/OnlinePlay/Matchmaking/RankedPlay/ResultsScreen.cs
Added audio sample loading and playback: EndedScreen plays win/lose/draw samples based on match outcome; ResultsScreen integrates comprehensive audio across appear sequence, score animation with stereo-balanced channels, damage events, and rank impact sounds.
Dependencies
osu.Game/osu.Game.csproj
Updated ppy.osu.Game.Resources package from version 2026.402.0 to 2026.404.0.

Sequence Diagram(s)

sequenceDiagram
    participant RC as ResultScreenContent<br/>(Load Phase)
    participant AM as AudioManager
    participant SC as SampleChannels<br/>(Playback)
    
    RC->>AM: Preload result samples<br/>(appear, damage, HP, rank)
    AM-->>RC: Sample instances
    
    rect rgba(100, 150, 200, 0.5)
        Note over RC,SC: Appear Sequence
        RC->>SC: Play results-appear sample
        SC-->>RC: Audio playing
    end
    
    rect rgba(100, 200, 150, 0.5)
        Note over RC,SC: Score/Counter Animation
        RC->>AM: Create score-tick channels
        AM-->>SC: Stereo-balanced channels
        RC->>SC: Schedule counter playback
        SC-->>RC: Audio loops/updates
    end
    
    rect rgba(200, 150, 100, 0.5)
        Note over RC,SC: Damage/Health Updates
        RC->>RC: Compute damage source
        RC->>SC: Play damage-fly sample<br/>(stereo-panned)
        RC->>SC: Play damage-hit sample
        SC-->>RC: Damage audio sequence
    end
    
    rect rgba(150, 100, 200, 0.5)
        Note over RC,SC: Rank Details Display
        RC->>AM: Map rank to grade sample
        RC->>SC: Play rank-impact audio
        SC-->>RC: Rank audio complete
    end
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Poem

🐰 Hop hop, the sounds now play,
When beatmaps dance the ranked-play way!
States whisper softly—downloading, dear,
While victory chimes and defeats we hear. 🎵
Audio weaves through each result,
A symphony born from testing cult!

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Updates ranked play UI to better communicate match state through new SFX cues and beatmap availability indicators, alongside a resource package bump.

Changes:

  • Bump ppy.osu.Game.Resources package version.
  • Add multiple SFX triggers to ranked play ended/results screens.
  • Extend RankedPlayUserDisplay to show beatmap download/import state and add/adjust visual tests.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
osu.Game/osu.Game.csproj Updates resources package version required for new assets.
osu.Game/Screens/OnlinePlay/Matchmaking/RankedPlay/ResultsScreen.cs Adds result/score/grade SFX and looping tick channels during counter animations.
osu.Game/Screens/OnlinePlay/Matchmaking/RankedPlay/EndedScreen.cs Adds win/lose/draw SFX on match end screen.
osu.Game/Screens/OnlinePlay/Matchmaking/RankedPlay/Components/RankedPlayUserDisplay.cs Displays beatmap availability state based on room updates and manages event subscription lifecycle.
osu.Game.Tests/Visual/RankedPlay/TestSceneRankedPlayUserDisplay.cs Updates setup to join ranked room, adds beatmap availability state test, and adjusts user IDs.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +569 to +576
Schedule(() =>
{
if (playerScoreTickChannel != null && playerScoreBar.Height >= playerScorePercent)
playerScoreTickChannel.Looping = false;

if (opponentScoreTickChannel != null && opponentScoreBar.Height >= opponentScorePercent)
opponentScoreTickChannel.Looping = false;
});
Copy link

Copilot AI Apr 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stopping the looping tick based on playerScoreBar.Height >= playerScorePercent (and same for opponent) is incorrect because Height is a lerped value in the range [0.05..1], not the underlying progress/percent; this can cause the loop to stop early (e.g., small percents). Compare against the actual progress value (e.g., e.NewValue >= playerScorePercent) instead. Also, scheduling a new action on every value change during transforms can enqueue many scheduled actions per frame; perform the stop check directly in the handler (or gate it so it runs once) to avoid unnecessary scheduler churn.

Suggested change
Schedule(() =>
{
if (playerScoreTickChannel != null && playerScoreBar.Height >= playerScorePercent)
playerScoreTickChannel.Looping = false;
if (opponentScoreTickChannel != null && opponentScoreBar.Height >= opponentScorePercent)
opponentScoreTickChannel.Looping = false;
});
if (playerScoreTickChannel != null && e.NewValue >= playerScorePercent)
playerScoreTickChannel.Looping = false;
if (opponentScoreTickChannel != null && e.NewValue >= opponentScorePercent)
opponentScoreTickChannel.Looping = false;

Copilot uses AI. Check for mistakes.
cornerPiece?.OnHealthChanged(e.NewValue);
});

client.RoomUpdated += onRoomUpdated;
Copy link

Copilot AI Apr 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The beatmap availability text won’t update until the next RoomUpdated event fires. If the room already has a non-default availability when this drawable appears, beatmapState will show the wrong initial state. Call onRoomUpdated() once after subscribing (or immediately before subscribing) so the UI reflects the current room state on first display.

Suggested change
client.RoomUpdated += onRoomUpdated;
client.RoomUpdated += onRoomUpdated;
onRoomUpdated();

Copilot uses AI. Check for mistakes.
@@ -36,23 +46,38 @@ public override void SetUpSteps()
[Test]
public void TesUserDisplay()
Copy link

Copilot AI Apr 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test method name has a typo (TesUserDisplay). Rename to TestUserDisplay for consistency with other tests and to improve discoverability in test runners and logs.

Suggested change
public void TesUserDisplay()
public void TestUserDisplay()

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants